#include <stdio.h>                                                                                     
#include <stdlib.h>
#include "client.h"
#include "protocole_client.h"
#include "../client/affichage.h"
#include "../contact.h"
#include "../fiche.h"
#include "../client/liste_circulaire.h"
#include <string.h>
#include "../client/popup.h"
#include "protocole_com.h"
#include <string.h>



int main()
{
   Contact c;
    pFiche fi;
    char message[33];

    if(Initialisation("127.1.1.1") != 1) 
    {
        printf("Erreur d'initialisation\n");
        return 1;
    }

    
    
    

   strcpy(message, "message client\n");
    printf("client : %s", message);
    com_envoie_message(message);

    com_recoit_message(message);
    printf("serveur : %s", message);


    contact_init(&c);
    strncpy(c.nom, "nom client", 10);
    c.nom[11]='\0';
    fi = creerFiche(&c);
    printf("client : nom client\n");
printf("\n%d\n",(int) sizeof(*fi));
 if(   com_envoie_structure(fi))
fprintf(stderr, "erreur com_envoie\n");

    com_recoit_structure(&fi);
    printf("serveur :%s\n", (fi->c).nom );






    Terminaison();

    return 0;
}
